home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.UserControl ResizeControl
- ClientHeight = 285
- ClientLeft = 0
- ClientTop = 0
- ClientWidth = 285
- InvisibleAtRuntime= -1 'True
- Picture = "ResizeControl.ctx":0000
- ScaleHeight = 285
- ScaleWidth = 285
- ToolboxBitmap = "ResizeControl.ctx":030A
- End
- Attribute VB_Name = "ResizeControl"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = True
- Option Explicit
- Public Property Get MaxHeight() As Long
- MaxHeight = lngMaxHeight
- End Property
- Public Property Let MaxHeight(ByVal lngNewValue As Long)
- lngMaxHeight = lngNewValue
- End Property
- Public Property Get MaxWidth() As Long
- MaxWidth = lngMaxWidth
- End Property
-
- Public Property Let MaxWidth(ByVal lngNewValue As Long)
- lngMaxWidth = lngNewValue
- End Property
-
- Public Property Get MinHeight() As Long
- MinHeight = lngMinHeight
- End Property
-
- Public Property Let MinHeight(ByVal lngNewValue As Long)
- lngMinHeight = lngNewValue
- End Property
- Public Property Get MinWidth() As Long
- MinWidth = lngMinWidth
- End Property
-
- Public Property Let MinWidth(ByVal lngNewValue As Long)
- lngMinWidth = lngNewValue
- End Property
-
- Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
- MaxHeight = PropBag.ReadProperty("MaxHeight", 1)
- MinHeight = PropBag.ReadProperty("MinHeight", 2)
- MaxWidth = PropBag.ReadProperty("MaxWidth", 3)
- MinWidth = PropBag.ReadProperty("MinWidth", 4)
-
- lngHwnd = UserControl.Parent.hWnd
- Hook
- End Sub
- Private Sub UserControl_Resize()
- UserControl.Width = 285
- UserControl.Height = 285
- End Sub
- Private Sub UserControl_Terminate()
- Unhook
- End Sub
-
- Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
- PropBag.WriteProperty "MaxHeight", MaxHeight
- PropBag.WriteProperty "MinHeight", MinHeight
- PropBag.WriteProperty "MaxWidth", MaxWidth
- PropBag.WriteProperty "MinWidth", MinWidth
- End Sub
-